DevForce Help Reference
First<TResult>(IEntityScalarQuery<TResult>,Expression<Func<TResult,Boolean>>,CancellationToken) Method


Returns the first element in the sequence that satisfies the specified condition. Pass in a System.Threading.CancellationToken to cancel operation.
Syntax
'Declaration
 
<ExtensionAttribute()>
Public Overloads Shared Function First(Of TResult)( _
   ByVal source As IEntityScalarQuery(Of TResult), _
   ByVal predicate As Expression(Of Func(Of TResult,Boolean)), _
   ByVal cancellationToken As CancellationToken _
) As Task(Of TResult)
'Usage
 
Dim source As IEntityScalarQuery(Of TResult)
Dim predicate As Expression(Of Func(Of TResult,Boolean))
Dim cancellationToken As CancellationToken
Dim value As Task(Of TResult)
 
value = EntityScalarAsyncExtensions.First(Of TResult)(source, predicate, cancellationToken)

Parameters

source
predicate
cancellationToken

Type Parameters

TResult
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

EntityScalarAsyncExtensions Class
EntityScalarAsyncExtensions Members
Overload List

Send Feedback